package com.xingda.packing.dmds.config;

import com.xingda.packing.dmds.minitor.dto.UserInfo;
import org.springframework.stereotype.Component;

@Component("threadLocalDMDSConfig")
public class ThreadLocalConfig {
    private static final ThreadLocal<UserInfo> threadLocal = new ThreadLocal<>();

    public UserInfo get() {
        return threadLocal.get();
    }

    public void set(UserInfo userInfo) {
        threadLocal.set(userInfo);
    }

    public void remove() {
        threadLocal.remove();
    }
}
